/**
 * Created by IntelliJ IDEA.
 * User: sunlin
 * Date: 12-12-27
 * Time: 下午2:11
 * To change this template use File | Settings | File Templates.
 */

function submitForm(){
    //登录
    var username = $("#username").val();
    var password = $("#password").val();

    $.post("/web/risk/login/doLogin",{username:username,password:password},function(data){
        if(data.success){
            //登录成功,隐藏登录界面
            $("#form").hide();
            $("#loginSuccess").show();
        }else{
            //登录失败,依然显示登录页面
            $("#form").show();
            $("#captcha").show();
        }
        //失败与否都显示结果
        $("#divResult").show();
        $("#spanCode").text(data.obj.code);
        $("#spanCode").show();
        $("#spanDescription").text(data.obj.description); 
        $("#spanDescription").show();
        $("#spanExtendInfo").text(data.obj.extendInfo);
        $("#spanExtendInfo").show();

    }, "json");
}
